home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / apps / 9 / applic / labels.cmd < prev    next >
Encoding:
Text File  |  1986-04-17  |  768 b   |  29 lines

  1. ***  This is a simple command file that will print out labels using ***
  2. ***  the People database outlined in the H&D Base tutorial.         ***
  3. ***  To print the labels on your printer instead of the screen,     ***
  4. ***     remove the '*' in front of the SET PRINT ON command.        ***
  5. ***  To execute this file enter DO LABELS from command level.       ***
  6.  
  7. USE people
  8. * SET PRINT ON
  9. DO WHILE .NOT. EOF
  10. ?
  11.  
  12. * The following six lines flip the first and last names around
  13. * if there is a comma in the name field
  14. IF ',' $ name
  15. STORE @(',',name) TO COMPTR
  16. ? TRIM($(name,COMPTR+2))+' '+$(name,1,COMPTR-1)
  17. ELSE
  18. ? name
  19. ENDIF
  20.  
  21. ? address
  22. ? TRIM(city)+", "+state+"  "
  23. ?? zip
  24. ?
  25. SKIP
  26. ENDDO
  27. SET PRINT OFF
  28.  
  29. əəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəə